import http from "../../utils/requestAI";
import {type ExampleGenerate,type Data, type addPrems } from "./HouseType_type";



//列表
export const getHouseType=(params?:Data)=>{

  return  http.get<ExampleGenerate>('/housetype/list',params);

}

//删除
export const delHouseType=(id:number)=>{

    console.log('删除1111',id);

    return  http.delete(`/housetype/delete/${id}`); 
  
}

export const delHouseTypeAll = (ids: number[]) => {
  console.log('批量删除执行', ids);
  return http.post(`/housetype/deleteAll`,ids);
}
export const addHouseType = (data: addPrems) => {
  return http.post(`/housetype/add`, data);
}

export const editHouseType = (from: { id: number; name: string }) => {
  console.log('获取id',from.id);
  
  return http.get(`/housetype/update`,from.id);
}